package com.cowain.api.commons;

import static com.cowain.api.code.SystemCode.TRAFFIC_SYSTEM_SUCCESS;

/**
 * @Author fxw
 * @Date 2022/5/12 21:12
 */
public  class ResponseResultFactory<T> {
    /**
     * 返回通用的成功状态码
     * @return
     */
    public static ResponseResult buildResponseResult(){
        return new ResponseResult(TRAFFIC_SYSTEM_SUCCESS);
    }
    public static ResponseResult buildResponseResult(String code){
        return new ResponseResult(code);
    }
    public static ResponseResult buildResponseResult(String resultCode,String resultMes){
        return new ResponseResult(resultCode,resultMes);
    }
    public static <T> ResponseResult buildResponseResult(String resultCode,T obj){
        return new ResponseResult(resultCode,obj);
    }
}
